

.PHONY:clean look all
all:test test1 test2
test:exitpthread.cpp
	g++ -o $@ $^ -lpthread

test1:joinpthread.cpp
	g++ -o $@ $^ -lpthread

test2:detachpthread.cpp
	g++ -o $@ $^ -lpthread
clean:
	rm -rf test
look:
	while :; do ps -eLf|head -1 && ps -eLf|grep test | grep -v grep|grep -v vim|grep -v May12;sleep 1; done